<!--{include(file='head.html')}-->
<script type="text/javascript" src="template/jslib/tbox/tbox.js"></script>
<link rel="stylesheet" href="template/jslib/tbox/tbox.css" type="text/css" />

<div id="wrap">
	<!--{include('left.html')}-->
	<div id="maincont">
		<b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b>
		<div id="main_c" >
			<form name="seaform" id="seaform" action="<!--{url('admin','coupon','userdraw')}-->" method="post">
				<div class="bt_bk">
					<span class="btn">
						<a href="javascript:void(0);" onclick="$.oper.refresh();return false;">刷新</a>
					</span>
					<span class="search_bk">
						<select name="couponid" id="couponid" autocomplete="off" class="select_tx">
							<option value="">优惠券</option>
							<!--{$couponopt}-->
						</select>
						<select name="isused" id="isused" autocomplete="off" class="select_tx">
							<option value="">是否使用</option>
							<option value="y" <!--{if $isused == 'y'}-->selected<!--{/if}-->>是</option>
							<option value="n" <!--{if $isused == 'n'}-->selected<!--{/if}-->>否</option>
						</select>
						<input type="button" value="搜索" class="input_bt" onclick="$.oper.seasubmit()"/>
					</span>
					<span class="state_tip"></span>
				</div>
				<input type="hidden" value="<!--{def($pagearr['page'],1)}-->"		name="page" id="page"/>
				<input type="hidden" value="<!--{def($pagearr['pagesize'],10)}-->"	name="pagesize" id="pagesize" />
			</form>
			<!--{include_page("page.html","top")}-->
			<table class="tableStyle" border="0" cellspacing="0" cellpadding="0">
				<thead>
					<tr align="center">
						<th width="20%">领取用户</th>
						<th width="10%">领取时间</th>
						<th width="10%">是否使用</th>
						<th width="40%">优惠券</th>
						<th width="20%">订单号</th>
					</tr>
				</thead>
				<tbody id="listtbody">
					<!--{foreach $infos info}-->
					<tr align="center">
						<td><!--{$info.uid}-->/<!--{$info.uname}--></td>
						<td><!--{date("m月d日",$info.addtime)}--></td>
						<td><!--{if $info.isused}-->是<!--{else}-->否<!--{/if}--></td>
						<td>面额：<!--{$info['deno']}--> 元，结束时间：<!--{date("Y-m-d",$info['endtime'])}--></td>
						<td>
							<!--{if $info.tradeid}-->
								<a href="javascript:void(0);" onclick="viewTrade('<!--{$info.tradeid}-->');return false;"><!--{$info.tradeid}--></a>
							<!--{else}-->
								--
							<!--{/if}-->
						</td>
					</tr>
					<!--{/foreach}-->
				</tbody>
			</table>
			<!--{include_page("page.html","foot")}-->
		</div>
		<b class="b4b"></b><b class="b3b"></b><b class="b2b"></b><b class="b1b"></b>
	</div>
</div>
<!--{include(file='foot.html')}-->
<script type="text/javascript">
function viewTrade(tradeid) {
	$.tbox.popup("<!--{url('admin','trade','tradeoper')}-->",'GET',{opertype:'view',tradeid:tradeid})
}
</script>
